add_subdirectory(lib_json)
add_subdirectory(mgr)
add_subdirectory(tool)
add_subdirectory(worker)

# find_library(LIBHV_PATH hv /usr/local/lib)
# IF(NOT LIBHV_PATH)
# MESSAGE(FATAL_ERROR "libhv not found")
# ENDIF(NOT LIBHV_PATH)

LINK_DIRECTORIES(/usr/local/opencv4/lib)
LINK_DIRECTORIES(/usr/local/cuda/lib64)

add_executable(videosplitter main.cpp)

target_link_libraries(videosplitter ${OPENCV_LIBRARIES} mgr_m worker_m tool_m json_m cuda nvcuvid hv avcodec avformat avutil swscale pthread dl)

install (TARGETS videosplitter DESTINATION bin)